package com.kede.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 回收订单，区域联系人映射表
 * @TableName t_recy_order_area_map
 */
@TableName(value ="sy_recy_order_area_map")
@Data
public class RecyOrderAreaMapDomain implements Serializable {
    /**
     * 回收订单id
     */
    @TableId(value = "recy_id")
    private Integer recyId;

    /**
     * 地区编码
     */
    @TableField(value = "area_code")
    private Integer areaCode;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RecyOrderAreaMapDomain other = (RecyOrderAreaMapDomain) that;
        return (this.getRecyId() == null ? other.getRecyId() == null : this.getRecyId().equals(other.getRecyId()))
            && (this.getAreaCode() == null ? other.getAreaCode() == null : this.getAreaCode().equals(other.getAreaCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRecyId() == null) ? 0 : getRecyId().hashCode());
        result = prime * result + ((getAreaCode() == null) ? 0 : getAreaCode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", recyId=").append(recyId);
        sb.append(", areaPhoneId=").append(areaCode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}